import sys


def sequenceCount(s: str):
    dp = [1]
    temp = {}
    for inx, value in enumerate(s):
        dp.append(dp[-1]*2)
        if value in temp: dp[-1] -= dp[temp[value]]
        temp[value] = inx
    count = (dp[-1]) % 20210101
    return count


if __name__ == '__main__':
    while True:
        s = sys.stdin.readline().strip()
        if len(s) > 0:
            n = sequenceCount(s)
            print(n)
        else:
            print(1)
            break
    # s = sys.stdin.readline().strip()
    # if len(s) > 0:
    #     n = sequenceCount(s)
    #     print(n)
    # else:
    #     print(1)
